\(\int (g+h x) (a+b \log (c (d (e+f x)^p)^q))^n \, dx\) [515]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F]
   Maxima [F(-2)]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 26, antiderivative size = 281 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \, dx=\frac {2^{-1-n} e^{-\frac {2 a}{b p q}} h (e+f x)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \Gamma \left (1+n,-\frac {2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \left (-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )^{-n}}{f^2}+\frac {e^{-\frac {a}{b p q}} (f g-e h) (e+f x) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \Gamma \left (1+n,-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \left (-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )^{-n}}{f^2} \]

[Out]

2^(-1-n)*h*(f*x+e)^2*GAMMA(1+n,-2*(a+b*ln(c*(d*(f*x+e)^p)^q))/b/p/q)*(a+b*ln(c*(d*(f*x+e)^p)^q))^n/exp(2*a/b/p
/q)/f^2/((c*(d*(f*x+e)^p)^q)^(2/p/q))/(((-a-b*ln(c*(d*(f*x+e)^p)^q))/b/p/q)^n)+(-e*h+f*g)*(f*x+e)*GAMMA(1+n,(-
a-b*ln(c*(d*(f*x+e)^p)^q))/b/p/q)*(a+b*ln(c*(d*(f*x+e)^p)^q))^n/exp(a/b/p/q)/f^2/((c*(d*(f*x+e)^p)^q)^(1/p/q))
/(((-a-b*ln(c*(d*(f*x+e)^p)^q))/b/p/q)^n)

Rubi [A] (verified)

Time = 0.37 (sec) , antiderivative size = 281, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {2448, 2436, 2337, 2212, 2437, 2347, 2495} \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \, dx=\frac {(e+f x) e^{-\frac {a}{b p q}} (f g-e h) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \left (-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )^{-n} \Gamma \left (n+1,-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )}{f^2}+\frac {h 2^{-n-1} (e+f x)^2 e^{-\frac {2 a}{b p q}} \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \left (-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )^{-n} \Gamma \left (n+1,-\frac {2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )}{f^2} \]

[In]

Int[(g + h*x)*(a + b*Log[c*(d*(e + f*x)^p)^q])^n,x]

[Out]

(2^(-1 - n)*h*(e + f*x)^2*Gamma[1 + n, (-2*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(b*p*q)]*(a + b*Log[c*(d*(e + f*x
)^p)^q])^n)/(E^((2*a)/(b*p*q))*f^2*(c*(d*(e + f*x)^p)^q)^(2/(p*q))*(-((a + b*Log[c*(d*(e + f*x)^p)^q])/(b*p*q)
))^n) + ((f*g - e*h)*(e + f*x)*Gamma[1 + n, -((a + b*Log[c*(d*(e + f*x)^p)^q])/(b*p*q))]*(a + b*Log[c*(d*(e +
f*x)^p)^q])^n)/(E^(a/(b*p*q))*f^2*(c*(d*(e + f*x)^p)^q)^(1/(p*q))*(-((a + b*Log[c*(d*(e + f*x)^p)^q])/(b*p*q))
)^n)

Rule 2212

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[(-F^(g*(e - c*(f/d))))*((c
+ d*x)^FracPart[m]/(d*((-f)*g*(Log[F]/d))^(IntPart[m] + 1)*((-f)*g*Log[F]*((c + d*x)/d))^FracPart[m]))*Gamma[m
 + 1, ((-f)*g*(Log[F]/d))*(c + d*x)], x] /; FreeQ[{F, c, d, e, f, g, m}, x] &&  !IntegerQ[m]

Rule 2337

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Dist[x/(n*(c*x^n)^(1/n)), Subst[Int[E^(x/n)*(a +
b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2347

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Dist[(d*x)^(m + 1)/(d*n*(c*x^n
)^((m + 1)/n)), Subst[Int[E^(((m + 1)/n)*x)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, m, n, p}
, x]

Rule 2436

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2437

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[(f*(x/d))^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 2448

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Int[Exp
andIntegrand[(f + g*x)^q*(a + b*Log[c*(d + e*x)^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[
e*f - d*g, 0] && IGtQ[q, 0]

Rule 2495

Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Subst[Int[u*(
a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e,
f, m, n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[IntHide[u*(a + b*Log[c*d^n*(e
+ f*x)^(m*n)])^p, x]]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int (g+h x) \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^n \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right ) \\ & = \text {Subst}\left (\int \left (\frac {(f g-e h) \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^n}{f}+\frac {h (e+f x) \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^n}{f}\right ) \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right ) \\ & = \text {Subst}\left (\frac {h \int (e+f x) \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^n \, dx}{f},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {(f g-e h) \int \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^n \, dx}{f},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right ) \\ & = \text {Subst}\left (\frac {h \text {Subst}\left (\int x \left (a+b \log \left (c d^q x^{p q}\right )\right )^n \, dx,x,e+f x\right )}{f^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {(f g-e h) \text {Subst}\left (\int \left (a+b \log \left (c d^q x^{p q}\right )\right )^n \, dx,x,e+f x\right )}{f^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right ) \\ & = \text {Subst}\left (\frac {\left (h (e+f x)^2 \left (c d^q (e+f x)^{p q}\right )^{-\frac {2}{p q}}\right ) \text {Subst}\left (\int e^{\frac {2 x}{p q}} (a+b x)^n \, dx,x,\log \left (c d^q (e+f x)^{p q}\right )\right )}{f^2 p q},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {\left ((f g-e h) (e+f x) \left (c d^q (e+f x)^{p q}\right )^{-\frac {1}{p q}}\right ) \text {Subst}\left (\int e^{\frac {x}{p q}} (a+b x)^n \, dx,x,\log \left (c d^q (e+f x)^{p q}\right )\right )}{f^2 p q},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right ) \\ & = \frac {2^{-1-n} e^{-\frac {2 a}{b p q}} h (e+f x)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \Gamma \left (1+n,-\frac {2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \left (-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )^{-n}}{f^2}+\frac {e^{-\frac {a}{b p q}} (f g-e h) (e+f x) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \Gamma \left (1+n,-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \left (-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )^{-n}}{f^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 227, normalized size of antiderivative = 0.81 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \, dx=\frac {2^{-1-n} e^{-\frac {2 a}{b p q}} (e+f x) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \left (h (e+f x) \Gamma \left (1+n,-\frac {2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{b p q}\right )+2^{1+n} e^{\frac {a}{b p q}} (f g-e h) \left (c \left (d (e+f x)^p\right )^q\right )^{\frac {1}{p q}} \Gamma \left (1+n,-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \left (-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{b p q}\right )^{-n}}{f^2} \]

[In]

Integrate[(g + h*x)*(a + b*Log[c*(d*(e + f*x)^p)^q])^n,x]

[Out]

(2^(-1 - n)*(e + f*x)*(h*(e + f*x)*Gamma[1 + n, (-2*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(b*p*q)] + 2^(1 + n)*E^(
a/(b*p*q))*(f*g - e*h)*(c*(d*(e + f*x)^p)^q)^(1/(p*q))*Gamma[1 + n, -((a + b*Log[c*(d*(e + f*x)^p)^q])/(b*p*q)
)])*(a + b*Log[c*(d*(e + f*x)^p)^q])^n)/(E^((2*a)/(b*p*q))*f^2*(c*(d*(e + f*x)^p)^q)^(2/(p*q))*(-((a + b*Log[c
*(d*(e + f*x)^p)^q])/(b*p*q)))^n)

Maple [F]

\[\int \left (h x +g \right ) {\left (a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )\right )}^{n}d x\]

[In]

int((h*x+g)*(a+b*ln(c*(d*(f*x+e)^p)^q))^n,x)

[Out]

int((h*x+g)*(a+b*ln(c*(d*(f*x+e)^p)^q))^n,x)

Fricas [F]

\[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \, dx=\int { {\left (h x + g\right )} {\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{n} \,d x } \]

[In]

integrate((h*x+g)*(a+b*log(c*(d*(f*x+e)^p)^q))^n,x, algorithm="fricas")

[Out]

integral((h*x + g)*(b*log(((f*x + e)^p*d)^q*c) + a)^n, x)

Sympy [F]

\[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \, dx=\int \left (a + b \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}\right )^{n} \left (g + h x\right )\, dx \]

[In]

integrate((h*x+g)*(a+b*ln(c*(d*(f*x+e)**p)**q))**n,x)

[Out]

Integral((a + b*log(c*(d*(e + f*x)**p)**q))**n*(g + h*x), x)

Maxima [F(-2)]

Exception generated. \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \, dx=\text {Exception raised: RuntimeError} \]

[In]

integrate((h*x+g)*(a+b*log(c*(d*(f*x+e)^p)^q))^n,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: In function CAR, the value of the first argument is  0which is not
 of the expected type LIST

Giac [F]

\[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \, dx=\int { {\left (h x + g\right )} {\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{n} \,d x } \]

[In]

integrate((h*x+g)*(a+b*log(c*(d*(f*x+e)^p)^q))^n,x, algorithm="giac")

[Out]

integrate((h*x + g)*(b*log(((f*x + e)^p*d)^q*c) + a)^n, x)

Mupad [F(-1)]

Timed out. \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^n \, dx=\int \left (g+h\,x\right )\,{\left (a+b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\right )}^n \,d x \]

[In]

int((g + h*x)*(a + b*log(c*(d*(e + f*x)^p)^q))^n,x)

[Out]

int((g + h*x)*(a + b*log(c*(d*(e + f*x)^p)^q))^n, x)